package com.yunhuajinfu.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.yunhuajinfu.base.SpulshBaseFragment;

import java.util.List;

/**
 * Created by ekikousei易皇星 on 16/11/18.
 * E-mail:13764664731@163.com
 * Signature:缘分是本书,翻的不经意会错过,读的太认真会流泪!!
 * <p/>
 * TODO:类描述:
 */
public class BaseFragmentAdapter extends FragmentStatePagerAdapter {

    private List<SpulshBaseFragment> list;
    public BaseFragmentAdapter(FragmentManager fm, List<SpulshBaseFragment> list) {
        super(fm);
        this.list = list;
    }

    public BaseFragmentAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int arg0) {
        return list.get(arg0);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
